#ifndef _HTTP_PROCESSOR_HPP_20120708
#define _HTTP_PROCESSOR_HPP_20120708

#include "base.hpp"

#include "connection.hpp"
#include "acceptor_manager.hpp"
#include "abstract_processor.hpp"

#include "queue_item.hpp"

using namespace mina;

class HttpProcessor : public AbstractProcessor
{
	public :
		typedef __gnu_cxx::hash_map<uint64_t, Request>  RequestMap;
		typedef RequestMap::iterator RequestMap_Iter;

		typedef std::vector<Connection*> RemoveVec;
		typedef RemoveVec::iterator RemoveVec_Iter;

	public :
		void accept_connect(Connection & conn); 

		void remove_connect(Connection & conn); 

		void process_message(Connection & conn, void * data);

		int poll();

	public :
		RequestMap   _request_map;

		RemoveVec    _remove_vec;

		DECL_LOGGER(logger);
};

#endif

